package net.ui.model.panel;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class PanelBean {

	private String id;

	private String type;

	private String actionGrouId;

	private String desc;

	private String title;

	private String icon;

	private String uiTemplate;

	private List<PanelElementBean> panelElements = new ArrayList<PanelElementBean>();
	
	private Map<String,PanelElementBean> panelElementMap = new HashMap<String,PanelElementBean>();
	
	private PanelConfig panelConfig;
	

	public PanelConfig getPanelConfig() {
		return panelConfig;
	}

	public void setPanelConfig(PanelConfig panelConfig) {
		this.panelConfig = panelConfig;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getActionGrouId() {
		return actionGrouId;
	}

	public void setActionGrouId(String actionGrouId) {
		this.actionGrouId = actionGrouId;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getUiTemplate() {
		return uiTemplate;
	}

	public void setUiTemplate(String uiTemplate) {
		this.uiTemplate = uiTemplate;
	}

	public List<PanelElementBean> getPanelElements() {
		return panelElements;
	}

	public void setPanelElements(List<PanelElementBean> panelElements) {
		this.panelElements = panelElements;
	}
	
	public void addElement(PanelElementBean elementBean){
		this.panelElements.add(elementBean);
		this.panelElementMap.put(elementBean.getId(), elementBean);
	}

	public Map<String, PanelElementBean> getPanelElementMap() {
		return panelElementMap;
	}

}
